-- card: 56532 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 4755 -- name: -- part contents for background part 4 ----- text ----- Another use of conditional compilation is to avoid reinclusion of header files which are themselves #included into other headers. (TC provides a simpler method to accomplish this.*) For a header file named 'filename.h', a common approach is to begin the file with: # ifndef filename_h /* like #ifdef, but means "if not defined" */ # define filename_h and end the file with: # endif Also, note that it is legal to nest #ifdef/#endif conditions. Certain names are defined automatically by the system in use. For example, the name THINK_C is defined whenever the TC compiler is in use. The following section demonstrates how to allow TC programs to compile equally under C++. -- part contents for background part 7 ----- text ----- 182 -- part contents for background part 29 ----- text ----- 54516 -- part contents for background part 27 ----- text ----- TC feature to prevent header reinclusion -- part contents for background part 20 ----- text ----- TC feature to prevent header reinclusion - p177